﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace FashionMural.Admin
{
    public partial class MyMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //HttpCookie cookie = System.Web.Security.FormsAuthentication.GetAuthCookie(username, false);
                if (string.IsNullOrEmpty(Session["admin"].ToString()))
                {
                    Response.Redirect("/Login.aspx");
                }
            }
            catch (Exception)
            {
                Response.Redirect("/Login.aspx");
            }
        }

        protected void LoginOut_Click(object sender, EventArgs e)
        {
            Session["admin"] = string.Empty;
            Response.Redirect("/Login.aspx");
        }

        protected void ClearCacheButton_Click(object sender, EventArgs e)
        {
            Session["admin"] = string.Empty;
        }
    }
}